$(function () {
    $("li.flexLi").click(function () {
        $("li.flexLi").removeClass("actives");
        $(this).addClass("actives");
    });
    $("ul.ulFlex>li").eq(0).click();
});

function imgDel(id) {
    if (confirm("确定删除图片?")) {
        $.ajax({
            url: Feng.ctxPath + "/doctorLooked/imgDel",
            type: "post",
            data: {
                id: id
            },
            success: function (data) {
                Feng.success('操作成功!');
                location.reload();
            },
            error: function (data) {
                alert('没有权限，请联系管理员!');
            }
        });
    };
};

var avatarUp = "";
function iconTypeChange() {//初始化
    avatarUp = new $IconUpload("avatar");
    avatarUp.setIconUploadBarId("progressBar");
    avatarUp.initIcon();
};

function uploadicon() {//上传影像
    var iconType = document.getElementById("iconType").value;
    var remarks = document.getElementById("remarks").value;
    if (iconType == '请选择' || remarks == '') {
        alert("请选择上传图片类型!");
    } else {
        avatarUp.initIcon();
    };
};

